# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-retdec-python
pkgver=0.5.2
pkgrel=10
pkgdesc='A Python library and tools providing easy access to the retdec.com decompilation service through their public REST API.'
url='https://pypi.org/project/retdec-python/#files'
arch=('any')
license=('MIT')
depends=('python' 'python-requests')
makedepends=('python-setuptools')
source=("https://pypi.python.org/packages/bf/f0/23eb89373e8586f6df35074aff816a10caab24e0f458665bdbbe14454347/retdec-python-$pkgver.tar.gz")
sha512sums=('7163990e7e8062d15bb4625ff12a225c9171fa28e9673d35c3d4d937ee46c8da118399591a317d91685ef276ad206ae9c723cb1fb4b1a571c4062e22e2c6636e')

build() {
  cd "retdec-python-$pkgver"

  python setup.py build
}

package() {
  cd "retdec-python-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/fileinfo" "$pkgdir/usr/bin/fileinfo-retdec"
}

